<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<base href="<%=basePath%>">
<link href="background/css/main.css" rel="stylesheet" type="text/css" />
<script>
		function jsSelectIsExitItem(objSelect, objItemValue) { 
		 var objSelect = document.getElementById("select");
	     for (var i = 0; i < objSelect.options.length; i++) {        
	         if (objSelect.options[i].value == objItemValue) {        
	             objSelect.options[i].selected = true;       
	         }        
	     }              
		}
</script>
</head>

<body onload="jsSelectIsExitItem('select', '<s:property value="member.mfields" />');">
	<s:form enctype="multipart/form-data" method="post" action="saveMember.action">
		<tr>
			<td colspan="2" class="header"><s:text name="editheader" /></td>
		</tr>
		<s:textfield name="member.mname" key="name" required="true" />
		<s:file name="file" key="image" />
		<tr>
			<td></td>
			<td>
				<s:property value="member.mphoto"/><br />
				<span style="font-size:12px;color:red">
	        	照片最大限制为500k，允许上传图片的类型为：bmp、png、gif、jpeg、jpg
	        	</span>
			</td>
		</tr>
		<s:select key="field" name="member.mfields" list="#{'微分动力系统':'微分动力系统','应用代数学':'应用代数学','应用软件':'应用软件'}" />
		<s:textfield name="member.mresArea" key="area" required="true" cssStyle="width:80%" />
		<s:textarea name="member.mteaching" key="teach" required="true" cssStyle="width:80%; height:60px"></s:textarea>
		<s:textarea name="member.mresume" key="resume" required="true" cssStyle="width:80%; height:60px"></s:textarea>
		<s:textarea name="member.mscientific" key="scientific" required="true" cssStyle="width:80%; height:60px"></s:textarea>
		<tr>
	    	<td colspan="2" class="button">
	    		<s:reset key="editreset" theme="simple" onclick="javascript:history.go(-1);" />
	    		<s:submit key="submit" theme="simple" />
	    	</td>
		</tr>
		<s:hidden name="member.mno" />
		<s:hidden name="member.mphoto" />
	</s:form>
</body>
</html>